Not able to access object data inside another object